public class FactoryMethodPattern {
 public static void main(String[] args) {
    ChickenFactory ikunfactory=new IKUNFactory();
    ikunfactory.createChicken().basketboll();
 }
}

interface ChickenFactory {
    public Chicken createChicken();
}

class CAIKUNFactory implements ChickenFactory {
    @Override
    public Chicken createChicken() {
        return new CAIKUN();
    }
}

class IKUNFactory implements ChickenFactory {

    @Override
    public Chicken createChicken() {
        return new IKUN();
    }
}

interface Chicken {
    void sing();

    void dance();

    void basketboll();
}

class CAIKUN implements Chicken {
    public void sing() {
    };

    public void dance() {
    };

    public void basketboll() {
    };
}

class IKUN implements Chicken {
    public void sing() {
    };

    public void dance() {
    };

    public void basketboll() {
    };
}